<?php
$this->breadcrumbs = array(
	'员工列表' => array(
		'index'
	),
	'管理',
);

$this->userActions = array(
	array(
		'label' => '新建员工',
		'url' => array(
			'employee/create'
		),
		'iconClass' => 'icon-user-add',
	)
);

?>

<h1>员工管理</h1>
<?php $this
	->widget('zii.widgets.grid.CGridView',
		array(
			'id' => 'employee-grid',
			'dataProvider' => $model->search(),
			'filter' => $model,
			'columns' => array(
				//'id',
				'familyName',
				'givenName',
				array(
					'name' => 'employed',
					'type' => 'boolean',
					'filter' => JHTML::getBooleanValues(),
				),
				'documentNumber',
				array(
					'name' => 'gender',
					'type' => 'raw',
					'value' => 'JHtml::getGender($data->gender)',
					'filter' => JHTML::getGenders()
				),
				'employedDate',
				'dateOfBirth',
				'identityCardNumber',
				/*
				'gender',
				'ethnicGroup',
				'homeTown',
				'education',
				'profession',
				'dateOfBirth',
				'healthCondition',
				'hireDate',
				'maritalStatus',
				'currentRank',
				'politicalStatus',
				'contactMobile',
				'contactPhone',
				'originalHomeAddress',
				'currentAddress',
				'emergencyContactName',
				'emergencyContactPhone',
				'identityCardNumber',
				'graduationSchool',
				'certificates',
				'personalHabits',
				'personalSocialPension',
				'personalSocialInjury',
				'personalSocialUemployed',
				'personalSocialIllness',
				'personalSocialInsurance',
				'familyMembers',
				'educationDetails',
				'workExperience',
				'outstandingAchievement',
				'note',
				'trialDate',
				'trialSalary',
				'employedDate',
				'unemployedDate',
				'signedCommitment',
				'signedSecrecyAgreement',
				'signedTrailContract',
				'signedEmploymentContract',
				'signedGuaranteeStatement',
				'signedJobStatement',
				'companyNote',
				'personalPhotoFile',
				'personalPhotoThumb',
				'createTime',
				'createUserId',
				'updateTime',
				'updateUserId',
				 */
				array(
					'name' => 'userId',
					'type' => 'raw',
					'filter' => false,
					'value' => '$data->user!=null?CHtml::link($data->user->username,array("user/view","id"=>$data->userId)):""'
				),
				array(
					'class' => 'CButtonColumn',
				),
			),
		));
?>
